<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<!--<link href="../js/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">-->
		<link rel="stylesheet" type="text/css" href="../../../js/bootstrap-3.3.7-dist/css/bootstrap.min.css"/>
		<!--<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />-->
		<link rel="stylesheet" type="text/css" href="../../../css/footer.css" />
		<link rel="stylesheet" type="text/css" href="../../../css/pay_renhebi.css"/>
		<script src="../../../js/flexible.min.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			#content{
				padding-top: 1.8rem;
			}
			input#renhebi{
				z-index: 2;
				position: relative;
				top: 0.041666rem;
				left: 0.027777rem;
			}
		</style>
	</head>

	<body>
		<div id="wrap">
			<div id="main">
				<div id="header">
					<a id="headImg" href="javascript:history.go(-1)"><img class="headImg" src="../../../images/12.png" /></a>
					<p id="headTitle">立即支付</p>
				</div>
				<div id="content">
					<ul class="renhebi">
						<li class="row">
							<p class="col-xs-4 col-sm-4 text-right">仁和币余额&nbsp;:&nbsp;</p>
							<span class="balance col-xs-8 col-sm-8 text-left">10000</span>
						</li>
						<li class="row">
							<p class="col-xs-4 col-sm-4 text-right">使用金额&nbsp;:&nbsp;</p>
							<input class="col-xs-6 col-sm-6 text-left" type="number" name="renhebi" id="renhebi"  value="" />
						</li>
						<li class="row">
							<p class="col-xs-2 col-sm-2"></p>
							<input class="col-xs-3 col-sm-3" type="submit" id="btn" value="确定" />
							<p class="col-xs-2 col-sm-2"></p>
							<input class="col-xs-3 col-sm-3" type="button" name="back" id="back" value="返回" />
							<p class="col-xs-2 col-sm-2"></p>
						</li>
					</ul>
				</div>
			</div>
			<div id="foot" class="row">
			<a class="foot col-xs-3 col-sm-3" href="../../kaoqin/index2.html">
					<img class="footImg" src="../../../images/15.png" />
					<p>管理</p>
				</a>
			<a class="foot col-xs-3 col-sm-3" href="../colalition.html">
					<img class="footImg" src="../../../images/14.png" />
					<p>联盟</p>
				</a>
			<a class="foot col-xs-3 col-sm-3" href="../../store/store.html">
					<img class="footImg" src="../../../images/11.png" />
					<p>商城</p>
				</a>
			<a class="foot col-xs-3 col-sm-3" href="../../personage/personIndex.html">
					<img class="footImg" src="../../../images/13.png" />
					<p>我的</p>
				</a>
		</div>
		</div>

	</body>
	<script src="../../../js/jquery-2.2.3.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../../js/bootstrap-3.3.7-dist/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$(function(){
			$.ajax({
				type:"post",
				url:"http://47.104.13.109/coin-service/coin/search",
				async:true,
				data:{
					"rhObject":"1",
					"rhType":"member"
				},
				success:function(data){
					$('.renhebi li:nth-child(1) span').html(data.rhNum);
				}
			});
			var str=window.location;
			str=unescape(str)
			var strs=parseFloat(str.split('=')[1]);
			$('#renhebi').on('input',function(){
				if(parseFloat($('#renhebi').val())<0 || parseFloat($('#renhebi').val())>strs){
					alert("您输入的钱数大于总金额");
					$('#renhebi').val("");
				}
			})
			$('#btn').on('click',function(){
				if($('#renhebi').val()){
					if(parseFloat($('#renhebi').val())>=0){
						window.location.href="pay_now.html?renhebi="+escape($('#renhebi').val());
					}else{
						alert("请正确填写金额");
					}
				}else{
					alert("请填写金额");
				}
				
			});
			$('#back').on('click',function(){
				window.history.go(-1); 
			})
		})
	</script>

</html>